<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;


class CreateProductDescriptionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('product_descriptions', function (Blueprint $table) {
            $table->id()->comment('商品详情表');
            $table->integer('product_id')->index()->comment('商品id');
            $table->text('description')->comment('商品详情');
            $table->string('type' ,20)->default('noActivity')->comment('活动类型 noActivity : 普通商品，seckill : 秒杀，bargain : 砍价，combination : 拼团');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('product_descriptions');
    }
}
